package com.asjy.service.impl;

import com.asjy.dao.UserDao;
import com.asjy.po.User;
import com.asjy.service.UserService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;


/**
 * @Auther: lilinlin
 * @Date: 2021/4/5
 * @Description: com.asjy.service.impl
 * @version: 1.0
 */
@Service
public class UserServiceImpl implements UserService {
    @Resource
    private UserDao userDao;
    @Override
    public User getUser(Integer id) {
        return userDao.getUser(id);
    }

    /**
     * 用户名验证
     * @param username
     * @return  用户数量
     */
    @Override
    public Integer checkUserName(String username)  {
        return userDao.checkUserName(username);
    }

    @Override
    public void addUser(User user) {
        userDao.addUser(user);
    }

    @Override
    public User checkUser(User user) {
        return userDao.checkUser(user);
    }

    @Override
    public Integer saveMyInfo(User user) {
        return userDao.saveMyInfo(user);
    }


}